package com.aaa.statistics.Controller.api;

import com.aaa.entity.CareOrderItem;
import com.aaa.statistics.service.MedicinesStsService;
import com.aaa.statistics.vo.CareOrderItemVo;
import com.aaa.vo.Result;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;
import java.util.Map;

@RestController
@RequestMapping("statistics/api/medicineSts")
public class MedicinesStsController {
    @Resource
    private MedicinesStsService medicinesStsService;

    /**
     *药品销售列表
     */
    @PostMapping("getMedStsList")
    public Result<List<CareOrderItem>> getMedStsList(@RequestBody CareOrderItemVo careOrderItemVo){
        return medicinesStsService.getMedStsList(careOrderItemVo);
    }
    /**
     * 药品销售统计列表
     */
    @PostMapping("getMedStatStsList")
    public Result<List<Map<String, Object>>> getMedStatStsList(@RequestBody CareOrderItemVo careOrderItemVo){
        return medicinesStsService.getMedStatStsList(careOrderItemVo);
    }
}
